window.imageResize = function(successCB,params)
	{
    	cordova.exec(successCB, failCB, "ImageResize", null, params);
	};
	
	function doImageResize()
	{
		resizeImage("/sdcard/DCIM/Camera/Picture1.jpg",-1,480,"/sdcard/DCIM/Camera/Picture1.jpg");
	}
	
	//wrapper function, use this when you want
	function resizeImage(sourcePath,targetWidth,targetHeight,targetPath)
	{
		var params=new Array();
		
		params[0]=sourcePath;
		params[1]=targetWidth;
		params[2]=targetHeight;
		params[3]=targetPath;
	
		window.imageResize(successCB,params);
	}
	
	function failCB(err)
	{
		alert("error:"+err);
	}
	
	function successCB(result)
	{
		alert("success:"+result);
	}